import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:geomancy/styles/index.dart';

class CommonCircleBtnWidget extends StatelessWidget {
  final double size;
  final String txt;
  final double? fontSize;
  final void Function() onTap;
  const CommonCircleBtnWidget({super.key, required this.size, required this.txt, required this.onTap, this.fontSize});

  @override
  Widget build(BuildContext context) {
    return Material(
      color: ColorStyle.themeColor,
      borderRadius: BorderRadius.all(Radius.circular(size / 2)),
      child: InkWell(
        onTap: onTap,
        highlightColor: const Color.fromRGBO(240, 171, 7, 1),
        splashColor: const Color.fromRGBO(240, 171, 7, 1),
        borderRadius: BorderRadius.all(Radius.circular(size / 2)),
        child: Container(
          width: size,
          height: size,
          alignment: Alignment.center,
          decoration: BoxDecoration(
              border: Border.all(width: 5.w, color: ColorStyle.borderColor),
              borderRadius: BorderRadius.all(Radius.circular(size / 2)),
          ),
          child: Text(txt, style: TextStyle(color: ColorStyle.textColor, fontSize: fontSize ?? 30.sp)),
        ),
      ),
    );
  }
}
